/*
 * @Author: 夏郑兴 971348024@qq.com
 * @Date: 2022-05-18 10:24:22
 * @LastEditors: 夏郑兴 971348024@qq.com
 * @LastEditTime: 2022-05-19 12:26:12
 * @FilePath: /gitee-project/Users/xzx/Desktop/A-xichen/yingxuan-git-project/pa220027-fenfa/src/api/service/message.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/system/request'

/**
 * 发送通知
 * content string
 * project_id string
 **/
export function sendMessage(data: object) {
  return request({
    url: '/admin/message/send',
    baseURL: '/api',
    method: 'post',
    data
  })
}

/**
 * 通知消息列表
 * page
 * page_size
 **/
export function getMessageList(data: object) {
  return request({
    url: '/admin/message/list',
    baseURL: '/api',
    method: 'post',
    data
  })
}

/**
 * 删除项目通知
 * id
 **/
export function delMessage(data: object) {
  return request({
    url: '/admin/message/del',
    baseURL: '/api',
    method: 'post',
    data
  })
}

/**
 * 主页公告
 * content 
 * status
 **/
 export function editHomeNotice(data: object) {
  return request({
    url: '/admin/message/home_notice/edit',
    baseURL: '/api',
    method: 'post',
    data
  })
}

/**
 * 获取主页公告详情
 * content 
 * status
 **/
 export function getHomeNotice() {
  return request({
    url: '/admin/message/home_notice/detail',
    baseURL: '/api',
    method: 'get'
  })
}

